import xlrd
import sqlite3
import matplotlib.pyplot as plt
import numpy as np
from Tkinter import *
import tkFont
import tkMessageBox
from main import *

# ------------------------------------

root = Tk() 

menu = Menu(root, bg="#131313", fg="#c2c2c2", bd=0, relief=SUNKEN, activebackground="#262626", activeforeground="#c2c2c2")
root.config(menu=menu)

subMenu = Menu(menu, tearoff=0, relief=SUNKEN, bg="#131313", fg="#c2c2c2", bd=0, activebackground="#262626", activeforeground="#c2c2c2")
menu.add_cascade(label="File", menu=subMenu)
subMenu.add_command(label="Exit", command=root.quit)

# ------------------------------------

frame = Frame(root, bg="#161616", height=100, width=800)
frame.pack(fill=X)

helv36 = tkFont.Font(family="Helvetica", size=22, weight="bold")
helv12 = tkFont.Font(family="Helvetica", size=12, weight="bold")
title_label = Label(frame, text="Visualizador de Graficos", font=helv36, fg="#c2c2c2", bg="#161616", height=2, anchor=CENTER)
title_label.pack()

# -----------------------------------

frame2 = Frame(root, bg="#121212", height=75, width=800)
frame2.pack(fill=X)

type_one_button = Button(frame2, text="Grafico de linhas", relief=RAISED, bd=0, bg="#191919", fg="#c2c2c2", width=15, command= line)
type_one_button.grid(column=0, row=0, columnspan=2, padx=20, sticky=E)

type_two_button = Button(frame2, text="Grafico de barras", relief=RAISED, bd=0, bg="#191919", fg="#c2c2c2", width=15, command= bar)
type_two_button.grid(column=1, row=1, columnspan=2, padx=20, sticky=E)


# ------------------------------------

frame3 = Frame(root, bg="#161616", height=350, width=800)
frame3.pack(fill=X)

mess = Message(frame3, font=helv12, padx=20, pady=20, bg="#161616", fg="#c2c2c2", text="Bem vindo ao visualizador de graficos.\nNeste programa podera visualizar dois tipos de graficos:\n\tGrafico de Linhas\n\tGrafico de Barras") 
mess.pack()

root.mainloop()
